
package com.hlkj.pay.gateway.merchant;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import javax.servlet.http.HttpServletRequest;

import com.hlkj.framework.common.pojo.CommonResult;
import com.hlkj.pay.dto.merchant.access.MerchantAccessBalanceDto;
import com.hlkj.pay.dto.order.notify.OrderSettleNotifyDto;
import com.hlkj.pay.infrastructure.model.merchant.MerchantAccessInfoDO;
import com.hlkj.pay.infrastructure.model.order.OrderSettleDO;
import com.hlkj.pay.infrastructure.model.pay.ProviderChannelConfigDO;

/**
 * @author HlpayTeam
 * @date 2024/12/20 14:59
 */
public interface IMerchantAccessSettleGateway {

    /**
     *
     * @param channelCode
     * @return
     */
    boolean extensionExist(String channelCode);

    /**
     *
     * @param merchantAccessInfoDO
     * @return
     */
    CommonResult<MerchantAccessBalanceDto> queryAccessBalance(MerchantAccessInfoDO merchantAccessInfoDO);

    /**
     *
     * @param merchantAccessInfoDO
     * @param orderDO
     */
    CommonResult<OrderSettleDO> submitAccessSettle(MerchantAccessInfoDO merchantAccessInfoDO, OrderSettleDO orderDO);

    /**
     *
     * @param merchantAccessInfoDO
     * @param orderSettleDO
     * @return
     */
    OrderSettleDO queryAccessSettle(MerchantAccessInfoDO merchantAccessInfoDO, OrderSettleDO orderSettleDO);

    /**
     *
     * @param request
     * @param providerChannelConfigDO
     * @return
     */
    CommonResult<OrderSettleNotifyDto> orderStatusParse(HttpServletRequest request, ProviderChannelConfigDO providerChannelConfigDO);
}
